import java.util.HashSet;
import java.util.Scanner;

public class HJ9 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        StringBuilder sb = new StringBuilder(str);
        sb = sb.reverse();//反转
        HashSet set = new HashSet();//set添加不重复元素
        for(int i=0;i<sb.length();i++){
            if(set.add(sb.substring(i,i+1))){//不重复
                System.out.print(sb.substring(i,i+1));
            }
        }
    }
}
